package com.corpcredit.webapp.action;

import java.io.Serializable;
import java.util.List;

import com.corpcredit.webapp.action.BasePage;
import com.corpcredit.model.GlryCwfzr;
import com.corpcredit.model.Hyfl;
import com.corpcredit.model.Jbqk;
import com.corpcredit.service.GenericManager;
import com.corpcredit.service.LookupManager;

public class GlryCwfzrList extends BasePage implements Serializable {
    private GenericManager<GlryCwfzr, Long> glryCwfzrManager;
    private LookupManager lookupManager;
    private Jbqk jbqk;

    public void setJbqk( Jbqk jbqk )
    {
        this.jbqk = jbqk;
    }

    public void setLookupManager( LookupManager lookupManager )
    {
        this.lookupManager = lookupManager;
    }
    public void setGlryCwfzrManager(GenericManager<GlryCwfzr, Long> glryCwfzrManager) {
        this.glryCwfzrManager = glryCwfzrManager;
    }

    public GlryCwfzrList() {
        setSortColumn("id"); // sets the default sort column
    }

    /*
		select *from glry_Cwfzr gc join glry g 
		on gc.glr_id=g.id
		join jbqk j
		on g.jbq_id=j.id
		where j.id=2 ;
     */
    public List getGlryCwfzrs() {
    	return sort(lookupManager.findGlryCwfzrByJqbkID(jbqk.getId()));
        //return sort(glryCwfzrManager.getAll());
    }
}

